{include file="common/header" title="接口列表" /}
<link rel="stylesheet" href="/static/mobile/css/common/list.css">
    <div class="page-group">
        <div class="page">
            <header class="bar bar-nav">
                <a class="icon icon-me pull-left open-panel" id="slideBtn"></a>
                <h1 class="title"><img class="logo" src="/static/mobile/image/common/logo.png" alt=""></h1>
            </header>
            <div class="content">
                <!-- 添加 -->
                <div class="search-bar add-bar">
                    <a href="/mobile/interfaces/add" class="add-icon add-bar-icon" external><img src="/static/mobile/image/buss/add-icon.png" alt=""></a>
                </div>
                <!-- 列表 -->
                <div class="list-block">
                    {foreach $pay as $key=>$value}
                    <ul class="item-delete pr">
                        <li>
                            <a href="/mobile/interfaces/detail?id={$value['id']}" external>
                                <div class="item-content item-link">
                                    <div class="item-media"><i class="icon icon-f7"></i></div>
                                    <div class="item-inner item-border">
                                        <div class="item-title">{$value['pay_title']}</div>
                                    </div>
                                </div>
                                <div class="item-content">
                                    <div class="item-media"><i class="icon icon-f7"></i></div>
                                    <div class="item-inner">
                                        <div class="item-title item-time">{$value['pay_appid']}</div>
                                        <div class="item-after item-files">{$value['pay_type']}</div>
                                    </div>
                                </div>
                            </a>
                        </li>
                        <div class="item-del" data-id="{$value['id']}">删除</div>
                    </ul>
                    {/foreach}
                </div>
            </div>
        </div>
    </div>

{include file="common/footer" /}
<script src="/static/mobile/js/common/zepto.touchWipe.js"></script>
<script type="text/javascript">
    $(function() {
        $('.item-delete').touchWipe({itemDelete: '.item-del'});
    });
    $(document).on('click','.item-del', function () {
        var that = $(this);
        var id = that.data("id");
        $.confirm('确定删除该接口吗？', function () {
            $.post("/mobile/interfaces",{id:id},function (msg) {
                if(msg.msg){
                    that.parent().remove();
                }
            },"json");
        });
    });
</script>